#ifndef FARMER_H_GGJ
#define FARMER_H_GGJ

#include "Character.h"
#include "Animation.h"

namespace FarmerState
{
	enum Enum
	{
		PatrollingChickenPen,
		PatrollingInside,
		PatrollingDeathZone,

		Count
	};

	// keep in sync with Enum above, excluding "Count" value
	static std::string StringForEnum[FarmerState::Count] =
	{
		"chicken",
		"inside",
		"death_zone"
	};

	static std::map<std::string, FarmerState::Enum> EnumForString = DataUtils::GetInvertedIndex<FarmerState::Enum>(FarmerState::StringForEnum, FarmerState::Count);
};

class CFarmer : public CCharacter
{
public:
	CFarmer();
	~CFarmer();

	void SetState(FarmerState::Enum state);
private:
	virtual void DoMoveUp(float dt);
	virtual void DoMoveDown(float dt);
	virtual void DoMoveLeft(float dt);
	virtual void DoMoveRight(float dt);
	virtual void DoUseSkill();
	virtual void DoUpdate(float dt);

	virtual void DoRender(sf::RenderWindow* win);

	virtual void Idle();

	sf::Texture	m_tFarmerTex;
	sf::Sprite m_tFarmer;

	CAnimation* m_tAnimation;

	std::vector<sf::Vector2f> m_tRoutes[FarmerState::Count];
};

#endif // FARMER_H_GGJ